﻿using System;

public class GivenNumInArray
{
    static void Main()
    {
        int[] array = { 1, 3, 6, 6, 6, 8, 7, 98, 6, 9, 4, 12, 6 };
        int number = 6;

        int result = CheckNumInArray(array, number);
        Console.WriteLine(result);
    }

   public static int CheckNumInArray(int[] array, int number)
    {
        int counter = 0;
        for (int i = 0; i < array.Length; i++)
        {
            if (number==array[i])
            {
                counter++;
            }
        }
        return counter;
    }
}